package cn.duhengkui.orm.base;

import org.junit.Test;

import cn.duhengkui.national.valuelist.gen.CreateUtil;
import cn.duhengkui.national.valuelist.gen.DataBaseInfo;


public class CreateEntitys {

	@Test
	public void createEntities() {
		
		String driver = "oracle.jdbc.driver.OracleDriver";
		String url = "jdbc:oracle:thin:@????:1521:ORCL";
		String userName = "userName";//用户名
		String password = "password";//密码
		String entityPackage = "cn.duhengkui.create.test.entity";//生成entity包名
		String sourcePath = "src/main/java";//source folder
		String entityNamesPattern = "user,role";//表名称，可以支持多个，以逗号分隔
		DataBaseInfo dataBaseInfo = new DataBaseInfo(driver, url, userName, password);
		CreateUtil.createEntitys(dataBaseInfo, entityPackage, sourcePath, entityNamesPattern, true);
	}

}